<!-- <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel='stylesheet' type='text/css' href='css/index.css'>
</head>
<body>
    <div class="login" id="login" style="">
            <div class="login_2">
                 <img src="images/login.png" alt="">
            </div>
            <script type="text/javascript" src="js/common.js"></script>
            <script type="text/javascript" src="js/jquery-1.9.js"></script>
            
            <script type="text/javascript">
                $(function(){
                    $("#commit").click(function(){
                        if($("#loginName").val() == null || $("#loginName").val() == "请输入账号名或邮箱" || $("#loginName").val() == ""){
                            $("#login_1_1").html("账号不能为空！");
                        }else if($("#loginPwd").val() == null || $("#loginPwd").val() == ""){
                            $("#login_1_1").html("密码不能为空！")
                        }else{
                            $.ajax({dataType: "text",type: "post",url: "register.do",data: "username="+$("#loginName").val()+"&"+"password="+$("#loginPwd").val(),success: function(msg){
                                if(msg.trim() == "true"){
                                    location.reload();
                                    }else{
                                        $("#login_1_1").html("账号或密码错误！")
                                    }
                               }
                          
                            });
                        }
                    });
                });
                
            </script>
                <div class="login_3">
                    <div class="login_3_0">
                        <p id="login_1_1"></p>
                    </div>
                    <div class="login_3_1">
                        <label>帐号：</label>
                        <input type="text" value="请输入账号名或邮箱" maxlength="20" id="loginName" name="loginName" onclick="clickLogin()" onblur="mouserLogin()" />
                    </div>
                    <br />
                    <div class="login2_3_1">
                        <label>密码：</label>
                        <input type="password" maxlength="25" value="" id="loginPwd" name="loginPwd"/>
                    </div>
                    <div class="login_3_2">
                        <div class="login_3_2_1">
                            <input type="submit" value="登录" id = "commit" />
                        </div>
                        <div class="login_3_2_2">
                            <a href="#" title="忘记密码">忘记密码</a>
                            <a href="Register.jsp" title="注册用户">注册用户</a>
                            <span class="login_3_2_2_1">其他方式登录：</span>
                            <span class="login_3_2_2_2">
                                <a href="#" title="" class="login_3_2_2_2_1" ></a>
                                <a href="#" title="" class="login_3_2_2_2_2" ></a>
                                <a href="#" title="" class="login_3_2_2_2_3" ></a>
                                <a href="#" title="" class="login_3_2_2_2_4" ></a>
                            </span>
                        </div>
                    </div>
                </div>
       </div>
</body>
</html>